object FrameWarehouse: TFrameWarehouse
  Left = 0
  Top = 0
  Width = 650
  Height = 467
  TabOrder = 0
  inline FrameTopPanel1: TFrameTopPanel
    Left = 0
    Top = 0
    Width = 650
    Height = 35
    Align = alTop
    TabOrder = 0
    ExplicitLeft = -112
    ExplicitTop = 48
    inherited barProduct: TdxBarManager
      Categories.ItemsVisibles = (
        2)
      Categories.Visibles = (
        True)
      DockControlHeights = (
        0
        0
        34
        0)
    end
  end
  object GridWarehouse: TcxGrid
    Left = 0
    Top = 35
    Width = 650
    Height = 432
    Align = alClient
    TabOrder = 1
    LookAndFeel.Kind = lfOffice11
    ExplicitLeft = -102
    ExplicitTop = 7
    ExplicitWidth = 752
    ExplicitHeight = 460
    object ViewUsers: TcxGridDBTableView
      DataController.DataSource = dsWarehouse
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Format = '$ #,0.00'
          Kind = skSum
        end
        item
          Format = '#0 '#1096#1090'.'
          Kind = skSum
        end
        item
          Format = '#0 '#1096#1090'.'
          Kind = skSum
        end>
      DataController.Summary.SummaryGroups = <>
      OptionsData.Editing = False
      OptionsView.Footer = True
      OptionsView.GroupByBox = False
      OptionsView.HeaderAutoHeight = True
      object ColumnName: TcxGridDBColumn
        Caption = #1053#1072#1080#1084#1077#1085#1086#1074#1072#1085#1080#1077
        DataBinding.FieldName = 'w_name'
        Width = 249
      end
      object ColumnOrg: TcxGridDBColumn
        Caption = #1054#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
        DataBinding.FieldName = 'o_name'
        Width = 255
      end
    end
    object LevelOrg: TcxGridLevel
      GridView = ViewUsers
    end
  end
  object QueryWarehouse: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO "'#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1080'"."'#1088#1086#1083#1080'"'
      '  (id, name, uni_name, reg_name)'
      'VALUES'
      '  (:id, :name, :uni_name, :reg_name)')
    SQLDelete.Strings = (
      'DELETE FROM "'#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1080'"."'#1088#1086#1083#1080'"'
      'WHERE'
      '  id = :Old_id')
    SQLUpdate.Strings = (
      'UPDATE "'#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1080'"."'#1088#1086#1083#1080'"'
      'SET'
      
        '  id = :id, name = :name, uni_name = :uni_name, reg_name = :reg_' +
        'name'
      'WHERE'
      '  id = :Old_id')
    SQLLock.Strings = (
      'SELECT * FROM "'#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1080'"."'#1088#1086#1083#1080'"'
      'WHERE'
      '  id = :Old_id'
      'FOR UPDATE NOWAIT')
    SQLRefresh.Strings = (
      'SELECT id, name, uni_name, reg_name FROM "'#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1080'"."'#1088#1086#1083#1080'"'
      'WHERE'
      '  id = :id')
    Connection = DM1.db1
    SQL.Strings = (
      'SELECT '
      '  o.name o_name,'
      '  w.name w_name,'
      '  w.id,'
      '  w."'#1082#1086#1076'_'#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1080'"'
      'FROM'
      '  "'#1089#1082#1083#1072#1076'"."'#1094#1077#1093#1072'" w'
      
        '  INNER JOIN "'#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103'"."'#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1080'" o ON (w."'#1082#1086#1076'_'#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080 +
        #1080'" = o.id)'
      '  order by o_name, w_name')
    MasterFields = 'id'
    DetailFields = #1082#1086#1076'_'#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1080
    Left = 480
    Top = 208
  end
  object dsWarehouse: TDataSource
    DataSet = QueryWarehouse
    Left = 480
    Top = 272
  end
end
